package com.petter.jvm.gc;

import java.util.ArrayList;
import java.util.List;

/**
 * @author : GD
 * @date :2021/12/10 : 14:22
 */
public class GcPrintTest {
    public static void main(String[] args) {
        List list = new ArrayList<>();
        int i = 0;
        while(true){
            byte[] bytes = new byte[1024*1024*10];
            list.add(bytes);
            i++;
            if(i == 100){
                list.clear();
                System.out.println("is gc");
                System.gc();
                i=0;
            }
        }
    }
}
